<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>校历信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#searchForm").validate({
				submitHandler: function(form){
					loading('正在查询，请稍等...');
					// var schoolYear = document.getElementById("schoolYear").value;
					// if (schoolYear != "") {
					// 	document.getElementById("schoolYear").value = schoolYear + "-01-01";
					// }
					 form.submit();
				}
			});
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/biz/bizSchoolCalendar/">校历信息列表</a></li>
		<shiro:hasPermission name="biz:bizSchoolCalendar:edit"><li><a href="${ctx}/biz/bizSchoolCalendar/form">校历信息添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="bizSchoolCalendar" action="${ctx}/biz/bizSchoolCalendar/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>学年：</label>
				<input id="schoolYear" name="schoolYear" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
					value="${bizSchoolCalendar.schoolYear}"
					onclick="WdatePicker({dateFmt:'yyyy',isShowClear:true});"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>学年</th>
				<th>第一学期上课开始日期</th>
				<th>第一学期上课结束日期</th>
				<th>第一学期假期开始日期</th>
				<th>第一学期假期结束日期</th>
				<th>第二学期上课开始日期</th>
				<th>第二学期上课结束日期</th>
				<th>第二学期假期开始日期</th>
				<th>第二学期假期结束日期</th>
				<shiro:hasPermission name="biz:bizSchoolCalendar:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="bizSchoolCalendar">
			<tr>
				<td>
                    <a href="${ctx}/biz/bizSchoolCalendar/form?id=${bizSchoolCalendar.id}">
						${bizSchoolCalendar.schoolYear}
                    </a>
				</td>
				<td>
					<fmt:formatDate value="${bizSchoolCalendar.firstClassStartDate}" pattern="yyyy-MM-dd"/>
				</td>
				<td>
					<fmt:formatDate value="${bizSchoolCalendar.firstClassEndDate}" pattern="yyyy-MM-dd"/>
				</td>
				<td>
					<fmt:formatDate value="${bizSchoolCalendar.firstHolidayStartDate}" pattern="yyyy-MM-dd"/>
				</td>
				<td>
					<fmt:formatDate value="${bizSchoolCalendar.firstHolidayEndDate}" pattern="yyyy-MM-dd"/>
				</td>
				<td>
					<fmt:formatDate value="${bizSchoolCalendar.secondClassStartDate}" pattern="yyyy-MM-dd"/>
				</td>
				<td>
					<fmt:formatDate value="${bizSchoolCalendar.secondClassEndDate}" pattern="yyyy-MM-dd"/>
				</td>
				<td>
					<fmt:formatDate value="${bizSchoolCalendar.secondHolidayStartDate}" pattern="yyyy-MM-dd"/>
				</td>
				<td>
					<fmt:formatDate value="${bizSchoolCalendar.secondHolidayEndDate}" pattern="yyyy-MM-dd"/>
				</td>
               <%-- <td>
                        ${bizSchoolCalendar.remarks}
                </td>--%>
				<shiro:hasPermission name="biz:bizSchoolCalendar:edit"><td>
    				<a href="${ctx}/biz/bizSchoolCalendar/form?id=${bizSchoolCalendar.id}">修改</a>
					<a href="${ctx}/biz/bizSchoolCalendar/delete?id=${bizSchoolCalendar.id}" onclick="return confirmx('确认要删除该校历信息吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>